package cn.tradewin.pmp.pages.test;

import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.InjectComponent;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Zone;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.slf4j.Logger;


public class ModalDialog {

	@Property
	@Persist
	private String username;
	
	@Property
	private String password;
	
	@Inject
	private Block modalDialogContents;
	
	@InjectComponent
	Zone closeZone;

	@Inject 
	Logger log;
	
	
	public Block onShowDialog()
	{
	   return modalDialogContents;
	}

	public Zone onCloseDialog()
	{
	   return closeZone;
	}
	
	void onSuccess() {
		log.debug("execute successful--");
	}
	
}
